﻿<html DIR="LTR" xmlns:tool="http://www.microsoft.com/tooltip" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ddue="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
  <head>
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8" />
    <META NAME="save" CONTENT="history" />
    <title>National Character Set Support</title>
    
    <link rel="stylesheet" type="text/css" href="../local/Classic.css">
      
    </link>
    
    <script src="../local/script.js">
      
    </script><script src="../local/script_main.js">&amp;nbsp;</script>
  </head>
  <body>
    <!--Topic built:03/05/2009 21:01:45-->

    
    
    
    
    
    
    
    
    
    <div id="header">
      <table width="100%" id="topTable"><tr>
          <td align="left">
            <span id="headerBold">National Character Set Support</span>
          </td>
          <td align="right">
            
          </td>
        </tr></table>
      
      
      
    </div>
    <div id="mainSection">
      
        
        
		<font color="DarkGray"> </font> <p /> <p />
	
        <div id="introductionSection" class="section">
    <p>Starting with the Microsoft SQL Server JDBC Driver version 2.0, the JDBC driver provides support for the JDBC 4.0 API, which includes new national character set conversion API methods. This support includes new setter, getter, and updater methods for <b>NCHAR</b>, <b>NVARCHAR</b>, <b>LONGNVARCHAR</b>, and <b>NCLOB</b> JDBC types.</p>
    <p>The following is a list of new getter, setter, and updater methods to support the national character set conversion:</p>
    <ul><li>
        
          <a href="a8481c06-fbba-432b-8c69-4f4619c20ad4.htm">SQLServerPreparedStatement</a>: <a href="b7da6d44-f5b1-44f8-95f5-40179968b1b0.htm">setNString</a>, <a href="2c245f0e-85ec-4d94-93ac-4957aa52b984.htm">setNCharacterStream</a>, <a href="7ec1d24d-f732-44f3-9608-734ce2df4489.htm">setNClob</a>.<br />
      </li><li>
        
          <a href="30710a63-c05d-47d9-9cf9-c087a1c76373.htm">SQLServerCallableStatement</a>: <a href="9a86daeb-03b2-45ef-82d3-495f33fb0113.htm">getNClob</a>, <a href="5ac360e8-a1ee-4577-93b4-bb2018f1087a.htm">getNString</a>, <a href="e4f1e99c-4c7a-4c83-b202-4608538ab50b.htm">getNCharacterStream</a>, <a href="6494300b-7fc0-4076-8311-22d35a96cdc6.htm">setNString</a>, <a href="77905630-0135-46ad-a419-215e648996e2.htm">setNCharacterStream</a>, <a href="fd972acc-57e5-4971-9744-0e8fca5f05a6.htm">setNClob</a>.<br />
      </li><li>
        
          <a href="eaffcff1-286c-459f-83da-3150778480c9.htm">SQLServerResultSet</a>: <a href="432901eb-57b6-44ad-98b4-43164bcbc2b6.htm">getNClob</a>, <a href="023a238b-37f2-4966-bc91-ef2b22aebc46.htm">getNString</a>, <a href="69620047-78fd-4be9-a245-1851afaeac1b.htm">getNCharacterStream</a>, <a href="0cb0d347-4449-4920-b382-05f88f2a3225.htm">updateNClob</a>, <a href="0b6b65a1-8e62-4cd5-ab28-6231c3e20d81.htm">updateNString</a>, <a href="d6a21d01-6d8e-4449-9fdf-ddb09bd4fdb8.htm">updateNCharacterStream</a>.<br />
      </li></ul>
    <div style="margin: .5em 1.5em .5em 1.5em"><b>Note: </b>
      You must set the classpath to include the sqljdbc4.jar file to use these methods in your application.<p />
    </div>
    <p>In order to send String parameters to the server in Unicode format, the applications should either use the new JDBC 4.0 national character methods; or set the <b>sendStringParametersAsUnicode</b> connection property to "<b>true</b>" when using the non-national character methods. The recommended way is to use the new JDBC 4.0 national character methods where possible. For more information about the <b>sendStringParametersAsUnicode</b> connection property, see <a href="f1b62700-f046-488d-bd6b-a5cd8fc345b7.htm">Setting the Connection Properties</a>.</p>
  </div><span id="seeAlsoSpan"><h1 class="heading">See Also</h1></span><div id="seeAlsoSection" class="section" name="collapseableSection"><a href="7802328d-4d23-4775-9573-4169b127d258.htm">Understanding the JDBC Driver Data Types</a><br /><br /></div><!--[if gte IE 5]>
			<tool:tip element="seeAlsoToolTip" avoidmouse="false"/><tool:tip element="languageFilterToolTip" avoidmouse="false"/><tool:tip element="roleInfoSpan" avoidmouse="false"/>
		<![endif]-->
      <div id="footer" class="section">
        
		<hr />
		
		<span id="fb" class="feedbackcss">
			
			
		</span>
		
		<a href="9bad553b-9e70-4696-8499-2e35f772a1e0.htm">
			
			© 2009 Microsoft Corporation. All rights reserved.
		</a>
 	
	
      </div>
    </div>
  </body>
</html>